<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="#A" data-toggle="tab">{:L('GENERAL_SETTING')}</a></li>
			<li style="display:none;"><a href="#B" data-toggle="tab">{:L('SEO_SETTING')}</a></li>
			<li style="display:none;"><a href="#C" data-toggle="tab">{:L('TEMPLATE_SETTING')}</a></li>
		</ul>
		<form class="form-horizontal js-ajax-form" action="{:U('AdminTerm/edit_post')}" method="post">
			<input type="hidden" name="term_id" value="{$data.term_id}" />
			<div class="tabbable">
				<div class="tab-content">
					<div class="tab-pane active" id="A">
						<fieldset>
							<div class="control-group"  style="display:none;">
								<label class="control-label">{:L('PARENT')}</label>
								<div class="controls">
									<select name="parent">
										<option value="0">{:L('ROOT')}</option> {$terms_tree}
									</select>
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">{:L('NAME')}</label>
								<div class="controls">
									<input type="text" name="name" value="{$data.name}"><span class="form-required">*</span>
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">{:L('CATEGORY_DESCRIPTION')}</label>
								<div class="controls">
									<textarea name="description" rows="5" cols="57">{$data.description}</textarea>
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">{:L('CATEGORY_TYPE')}</label>
								<div class="controls">
									<select name="taxonomy">
										<foreach name="taxonomys" item="vo"> <php>$selected=$data['taxonomy']==$key?"selected":""</php>
										<option value="{$key}"{$selected}>{$vo}</option>
										</foreach>
									</select>
								</div>
							</div>
						</fieldset>
					</div>
					<div class="tab-pane" id="B">
						<fieldset>
							<div class="control-group">
								<label class="control-label">{:L('SEO_TITLE')}</label>
								<div class="controls">
									<input type="text" name="seo_title" value="{$data.seo_title}">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">{:L('SEO_KEYWORDS')}</label>
								<div class="controls">
									<input type="text" name="seo_keywords" value="{$data.seo_keywords}">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">{:L('SEO_DESCRIPTION')}</label>
								<div class="controls">
									<textarea name="seo_description" rows="5" cols="57">{$data.seo_description}</textarea>
								</div>
							</div>
						</fieldset>
					</div>
					<div class="tab-pane" id="C">
						<php>$tpl_list=sp_admin_get_tpl_file_list();</php>
						<fieldset>
							<div class="control-group">
								<label class="control-label">{:L('LIST_TEMPLATE')}</label>
								<div class="controls">
									<php>
										$list_tpls=$tpl_list;
										unset($list_tpls['list']);
									</php>
									<select name="list_tpl">
										<option value="list">list{:C("TMPL_TEMPLATE_SUFFIX")}</option>
										<foreach name="list_tpls" item="vo">
											<php>$template_selected=$data['list_tpl']==$vo?"selected":"";</php>
											<option value="{$vo}"{$template_selected}>{$vo}{:C("TMPL_TEMPLATE_SUFFIX")}</option>
										</foreach>
									</select>
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">{:L('ARTICLE_TEMPLATE')}</label>
								<div class="controls">
									<php>
										$article_tpls=$tpl_list;
										unset($article_tpls['article']);
									</php>
									<select name="one_tpl">
										<option value="article">article{:C("TMPL_TEMPLATE_SUFFIX")}</option>
										<foreach name="article_tpls" item="vo">
											<php>$template_selected=$data['one_tpl']==$vo?"selected":"";</php>
											<option value="{$vo}"{$template_selected}>{$vo}{:C("TMPL_TEMPLATE_SUFFIX")}</option>
										</foreach>
									</select>
								</div>
							</div>
						</fieldset>
					</div>
				</div>
			</div>
			<div class="form-actions">
				<button class="btn btn-primary js-ajax-submit" type="submit">{:L('SAVE')}</button>
				<a class="btn" href="{:U('AdminTerm/index')}">{:L('BACK')}</a>
			</div>
		</form>
	</div>
	<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
</body>
</html>